
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} Root_src)

set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
add_library(clicore SHARED ${Root_src} RuisException.cpp)

target_link_libraries(clicore duilib)
set_target_properties(clicore PROPERTIES OUTPUT_NAME "clicore")
add_custom_command(TARGET clicore POST_BUILD
  COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_BINARY_DIR}/lib/libclicore.dll ${PROJECT_SOURCE_DIR}/bin/libclicore.dll
  COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_BINARY_DIR}/lib/libclicore.dll ${PROJECT_BINARY_DIR}/client/libclicore.dll
)